package com.qf.service.impl;

import com.qf.dao.AccountDao;
import com.qf.service.AccountService;

import java.math.BigDecimal;

public class AccountServiceImpl implements AccountService {
    private AccountDao accountDao;

    public void setAccountDao(AccountDao accountDao) {
        this.accountDao = accountDao;
    }

    @Override
    public void transfer(String cardNo, String toCardNo, BigDecimal money) {
        accountDao.minusUpdate(cardNo,money);
        accountDao.plusUpdate(toCardNo,money);
    }
}
